package cn.sxt.yxl.pojo;

import java.util.Date;

/**
 * 角色的POJO
 * 
 * @author wangshSxt
 *
 */
public class AColumns
{
	
	private int id;
	private String name;
	private String content;
	private byte status;
	private String url;
	private byte flag;
	private Date createTime;
	private Date updateTime;
	private Date pubTime;
	private String statusStr;
	private String flagStr;
	public int getId()
	{
		return id;
	}

	public void setId(int id)
	{
		this.id = id;
	}

	public String getName()
	{
		return name;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public String getContent()
	{
		return content;
	}

	public void setContent(String content)
	{
		this.content = content;
	}

	

	public byte getStatus() {
		return status;
	}

	public void setStatus(byte status) {
		this.status = status;
	}

	public Date getCreateTime()
	{
		return createTime;
	}

	public void setCreateTime(Date createTime)
	{
		this.createTime = createTime;
	}

	public Date getUpdateTime()
	{
		return updateTime;
	}

	public void setUpdateTime(Date updateTime)
	{
		this.updateTime = updateTime;
	}

	public Date getPubTime()
	{
		return pubTime;
	}

	public void setPubTime(Date pubTime)
	{
		this.pubTime = pubTime;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public byte getFlag() {
		return flag;
	}

	public void setFlag(byte flag) {
		this.flag = flag;
	}

	public String getStatusStr() {
		AColumnEnum[] columnEnums = AColumnEnum.values();
		for (int i = 0; i < columnEnums.length; i++) {
			AColumnEnum columnEnum = columnEnums[i];
			if(columnEnum.toString().startsWith("STATUS_")
					&& columnEnum.getStatus() == this.getStatus()){
				this.statusStr = columnEnum.getName();
			}						  
		}
		return statusStr;
	}

	public String getFlagStr() {
		AColumnEnum[] columnEnums = AColumnEnum.values();
		for (int i = 0; i < columnEnums.length; i++) {
			AColumnEnum columnEnum = columnEnums[i];
			if(columnEnum.toString().startsWith("FLAG_")
				&& columnEnum.getStatus() == this.getStatus()){
					this.flagStr = columnEnum.getName();
			}
		}
		return flagStr;
	}
	
}
